package com.breakfast.fun.adapter.home;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.breakfast.fun.R;
import com.breakfast.fun.other.ProductModel;

/**
 * 首页3d画廊适配器
 * Created by hp on 2016/8/21.
 */
public class HomeProductAdapter extends PagerViewModelAdapter<ProductModel> {
    public HomeProductAdapter(Context context) {
        super(context);
    }

    @Override
    public View getItemView(ViewGroup container, int position) {
        View view = get(position).getView(container.getContext());
        //之所以这么设置tag是因为和glide的setTag方法冲突，所以使用setTag(int,Object)来区分
        view.setTag(R.string.app_name, position);
        return view;
    }
}
